from pydantic import BaseModel, Field
from typing import Optional

class WorkBenchProcessBase(BaseModel):
    processName: str = Field(..., description="工序名称")
    description: Optional[str] = Field(None, description="描述")

class WorkBenchProcessCreate(WorkBenchProcessBase):
    processId: str = Field(..., description="工序ID")

class WorkBenchProcessUpdate(BaseModel):
    processName: Optional[str] = None
    description: Optional[str] = None

class WorkBenchProcessDetail(WorkBenchProcessBase):
    processId: str
    createdBy: Optional[str] = Field(None, description="创建人(后端自动生成)")
    createdAt: Optional[str] = Field(None, description="创建时间(后端自动生成)")
    updatedBy: Optional[str] = Field(None, description="更新人(后端自动生成)")
    updatedAt: Optional[str] = Field(None, description="更新时间(后端自动生成)")

class WorkBenchProcessToListSchema(BaseModel):
    processId: str = Field(..., description="工序ID") 